how to automate apps using python